﻿using UnityEngine;

public class SimpleDynamicCulling : MonoBehaviour
{

    private float freshTime = 1f;

    private float currentTime = 0;

    private float meshWight;
    // Update is called once per frame
    void Start()
    {
        var mesh = GetComponentInChildren<MeshRenderer>();
        meshWight = mesh.bounds.size.z;
    }
    //void Update()
    //{
        //currentTime += Time.deltaTime;
        //var mainUnit = PveManager.Instance.mainUnit;
        //if (mainUnit != null)
        //{
        //    if (mainUnit.gameObject.transform.position.x > gameObject.transform.position.x + meshWight)
        //    {
        //        gameObject.transform.position += new Vector3( 122,0, 0);
        //    }
        //}
    //}
}
